package com.itheima.method;

public class MethodDemo5 {
    public static void main(String[] args) {
        double max = getMax(124, 32.3);
        System.out.println("最大值是:" + max);
        System.out.println(getMax(23,46));
    }

    public static double getMax(double a, double b) {

/*         if(a>b){
            return a;
         }else {
             return b;
         }*/
        return a>b?a:b;
     /*   if (a > b) {
            c = a;
        } else {
            c=b;
        }
        return c;*/
    }
}
